﻿<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="Create.aspx.cs" Inherits="DepartmentSystem.Create" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>职工界面</title>
    <link href="resource/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <script src="resource/bootstrap/js/bootstrap.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:GridView ID="GridView1" CssClass="table table-bordered table-hover" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="workerNum" DataSourceID="SqlDataSource1" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None">
                <AlternatingRowStyle BackColor="PaleGoldenrod" />
                <Columns>
                    <asp:BoundField DataField="workerNum" HeaderText="职工号" InsertVisible="False" ReadOnly="True" SortExpression="workerNum" />
                    <asp:BoundField DataField="workerName" HeaderText="姓名" SortExpression="workerName" />
                    <asp:BoundField DataField="age" HeaderText="年龄" SortExpression="age" />
                    <asp:BoundField DataField="wage" HeaderText="月工资" SortExpression="wage" />
                    <asp:BoundField DataField="deptNum" HeaderText="部门号" SortExpression="deptNum" />
                    <asp:BoundField DataField="phoneNum" HeaderText="电话" SortExpression="phoneNum" />
                    <asp:BoundField DataField="office" HeaderText="办公室" SortExpression="office" />

                    
                <asp:CommandField HeaderText="修改" ShowEditButton="True" />
                <asp:CommandField HeaderText="删除" ShowDeleteButton="true" />

                </Columns>
                <FooterStyle BackColor="Tan" />
                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                <SortedAscendingCellStyle BackColor="#FAFAE7" />
                <SortedAscendingHeaderStyle BackColor="#DAC09E" />
                <SortedDescendingCellStyle BackColor="#E1DB9C" />
                <SortedDescendingHeaderStyle BackColor="#C2A47B" />
            </asp:GridView>         
            <asp:Button ID="Button1" class="btn btn-lg btn-primary" Style="width: 100px" runat="server" Text="返回登入" OnClick="Button1_Click" CausesValidation="False" Width="111px"  />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DepartmentSystemConnectionString %>" SelectCommand="SELECT * FROM [tb_worker]"></asp:SqlDataSource>
        </div>
    </form>
</body>
</html>
